# $Id$
# Maintainer: AndyRTR <andyrtr@archlinux.org>

# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Paolo "PalmaWay" Palmieri <palmaway@gmx.it>

pkgname=man2html
pkgver=3.0.1
pkgrel=5
pkgdesc="A Unix manpage-to-HTML converter"
arch=('any')
url="http://www.nongnu.org/man2html/"
license=('GPL')
depends=('man-db' 'perl')
# https://www.cpan.org/authors/id/E/EH/EHOOD/CHECKSUMS
source=(#http://www.oac.uci.edu/indiv/ehood/tar/$pkgname$pkgver.tar.gz
        https://www.cpan.org/authors/id/E/EH/EHOOD/$pkgname$pkgver.tar.gz)
sha256sums=('a3dd7fdd80785c14c2f5fa54a59bf93ca5f86f026612f68770a0507a3d4e5a29')

# consider to move to Debians fork also used by Fedora
# https://packages.debian.org/source/sid/man2html
# http://pkgs.fedoraproject.org/cgit/rpms/man2html.git/tree/man2html.spec

package() {
  cd ${srcdir}/${pkgname}${pkgver}
  install -d ${pkgdir}/usr/bin ${pkgdir}/usr/share/man/man1 
  perl install.me -batch -binpath ${pkgdir}/usr/bin -manpath ${pkgdir}/usr/share/man
  
  sed -i "s:/usr/local:/usr:" man.cgi
  install -m755 man.cgi ${pkgdir}/usr/bin/
}
